import { axios } from '@/utils/request'
import baseapi from '@/api/base'
import storage from 'store'
const api = {
  appContext: baseapi.biz,
  appAppId: baseapi.biz_app,
  fileUploadUrlPath: 'purchaseMedicalProductInfo/importfile/'
}

export default api

// 文件上传
export function fileUpload (parameters, headers) {
  const allheaders = {
    appId: baseapi.huiwcore_app,
    org: storage.get('org'),
  }
  return axios({
    url: api.appContext + api.fileUploadUrlPath,
    method: 'post',
    headers: Object.assign(headers, allheaders),
    data: parameters
  })
}
